import request from '@/utils/request';


/*
* 用户列表
* */
export const users = (params:any) => {
    return request({
        url:'/api/admin/users',
        method:'GET',
        params

    })

}


export const addUser = (data:any) => {
    return request({
        url:'/api/admin/users',
        method:'POST',
        data

    })

}

// 编辑用户传的数据
export const getUserInfo = (userid:any) => {
    return request({
        url:`/api/admin/users/${userid}`,
        method:'GET'

    })

}
// 编辑更新用户
export const updateUser = (userid:any,data:any) => {
    return request({
        url:`/api/admin/users/${userid}`,
        method:'PUT',
        data
    })

}